# coding:utf-8
import requests

def getWeather(city):
    r = requests.get(u'http://wthrcdn.etouch.cn/weather_mini?city=' + city)
    data = r.json()['data']['forecast'][0]
    return '%s: %s, %s' % (city, data['low'], data['high'])

cities = [u'北京', u'上海', u'深圳', u'洛阳']
print getWeather(cities[0])
print getWeather(cities[1])
print getWeather(cities[-1])
